package org.lq.service.impl;

import java.util.List;

import org.lq.dao.PersonDao;
import org.lq.dao.impl.PersonDaoImpl;
import org.lq.entity.Person;
import org.lq.service.PersonService;

public class PersonServiceImpl implements PersonService {

	private PersonDao pdao = new PersonDaoImpl();
	
	@Override
	public List<Person> findAll() {
		return pdao.findAll();
	}

	@Override
	public boolean add(Person p) {
		return pdao.add(p)>0;
	}

	@Override
	public boolean update(Person p) {
		return pdao.update(p)>0;
	}

	@Override
	public boolean delete(int id) {
		return pdao.delete(id)>0;
	}

	@Override
	public List<Person> likeByName(String name) {
		return pdao.likeByName(name);
	}

	@Override
	public List<Person> likeByPerson(Person p) {
		return pdao.likeByPerson(p);
	}

}
